[FLEX] MVC: choosing a view at runtime

Posted by Alberto M on Stack Overflow See other posts from Stack Overflow or by Alberto M
Published on 2010-03-15T11:36:19Z Indexed on 2010/03/15 11:39 UTC
Read the original article Hit count: 167

Filed under:
|

Hi all, I'm quite new to the MVC design-pattern, and I'm translating all of my old code.

I want to move to this pattern because I can change my views according to my needs, but I'm finding difficult to do it at runtime.

I found an excellent example of MVC, and all that I do is the following:

<mx:ViewStack xmlns:mx="http://www.adobe.com/2006/mxml" resizeToContent="true" xmlns:views="MVC.views.*">
  <views:HomeView id="Home"/>
  <views:SecondPage id="SecondPage "/>
</mx:ViewStack>

what if I wanted to change (whenever the Controller says so) one of the views, for example the SecondPage view?

(Hope I made my point clear)

© Stack Overflow or respective owner

Related posts about mvc

Related posts about flex